{extend name="platform/new_base" /}
{block name="resources"/}
{/block}
{block name="main"}
      <!--订购应用列表页面-->
        <table class="table v-table table-auto-center">
            <thead>
                <tr>
                    <th>订购应用</th>
                    <th>周期</th>
                    <th>原价</th>
                    <th>售价</th>
                </tr>
            </thead>
            <tbody id="list">
                <tr>
                   <td>
                       <div class="media text-left">
                           <div class="media-left"><img src="{:__IMG($module_info['logo'])}" width="60" height="60"></div>
                           <div class="media-body max-w-300">
                               <div class="line-2-ellipsis">{$module_info['title']}</div>
                           </div>
                       </div>
                    </td>
                    <td>{if $time==1}一个月{/if}{if $time==2}三个月{/if}{if $time==3}五个月{/if}{if $time==4}一年{/if}{if $time==5}两年{/if}{if $time==6}三年{/if}{if $time==7}四年{/if}</td>
                    <td>￥{$price}</td>
                    <td>￥{$pay_money}</td>
                </tr>
            </tbody>
        </table>
        <div class="agree-checkbox">
            <input type="checkbox" style="vertical-align: top;" class="agree-xieyi" checked>
            我已阅读并同意 <a href="javascript:;" class="text-primary">《微商来商城订购服务协议》</a>
        </div>
        <div class="application_pay">
            <div class="clearfix mb-10"><div class="pull-right">总计：<span class="application_pay_num text-red">{$pay_money}</span></div></div>
            <div class="clearfix"><div class="pull-right"><a href="javascript:;" data-id={$order_id}  class="btn btn-primary pay_now">立即支付</a></div></div>
        </div>

{/block}

{block name="script"}
<script>
require(['util'],function(util){
    $('body').on('click','.pay_now',function(){
       if(!$(".agree-xieyi").is(':checked')){
           util.message('请同意服务协议才能支付','danger');
           return false;
       }else{
           var order_id = $(this).data('id');
           location.href =  __URL(PLATFORMMAIN + '/pay/getPayValue&order_id='+order_id);
       }
    })
})
</script>
{/block}